from flask import Blueprint, render_template, request
from flask import Blueprint, request, render_template, jsonify, current_app
from applications.common.curd import model_to_dicts, enable_status, disable_status
from applications.common.helper import ModelFilter
from applications.extensions import db
from applications.common.utils import upload as upload_curd

from applications.common.utils.http import table_api, fail_api, success_api
from applications.models import Models

idata_bp = Blueprint('idata', __name__, url_prefix='/admin/idata')

@idata_bp.get('/')
# @authorize("admin:model_test", log=True)
def modeltest_main():
    return render_template('admin/idata/index.html')